package com.gitee.exporttool;

import com.gitee.exporttool.command.ExportCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import picocli.CommandLine;

@SpringBootApplication
public class ExportToolApplication implements CommandLineRunner {

    @Autowired
    private ExportCommand exportCommand;

    public static void main(String[] args) {
        SpringApplication.run(ExportToolApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        System.exit(new CommandLine(exportCommand).execute(args));
    }
}
